import request from '@/utils/request'

export default {
  //医院列表
  getHospList(page,limit,searchObj){
    return request({
      url: `/admin/hosp/hospital/list/${page}/${limit}`,
      method: 'get',
      params:searchObj
    })
  },
  //省市联动  查询所有省
  findByDictCode(dictCode){
    return request({
      url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
      method: 'get',
    })
  },
  //根据数据id查询子数据列表
  findChildrenData(id){
    return request({
      url: `/admin/cmn/dict/findChildrenData/${id}`,
      method: 'get',
    })
  },
  //更新上下线状态
  updateHospStatus(id,status){
    return request({
      url: `/admin/hosp/hospital/updateStatus/${id}/${status}`,
      method: 'put',
    })
  },
  //查看医院详情
  getHospById(id) {
    return request ({
      url: `/admin/hosp/hospital/showHospDetails/${id}`,
      method: 'get'
    })
  },
  //查看排班详情
  getDeptByHoscode(hoscode) {
    return request ({
      url: `/admin/hosp/department/getDeptList/${hoscode}`,
      method: 'get'
    })
  },
  getScheduleRule(page,limit,hoscode,depcode){
    return request ({
      url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },
  //查询排班详情
  getScheduleDetail(hoscode,depcode,workDate){
    return request ({
      url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
      method: 'get'
    })
  },
}
